package desktop.lan.cooperate;

import java.rmi.RemoteException;

import desktop.conf.key.KeyConfDefault;
import desktop.lan.remote.key.KeyRemoteImpl;
import desktop.lan.remote.key.KeyRemoteServer;

public class LanCooperateClient implements Runnable {
	private KeyRemoteImpl keyRemoteImpl;

	public LanCooperateClient() {
		try {
			this.keyRemoteImpl = new KeyRemoteImpl(new KeyConfDefault());
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	public KeyRemoteImpl getKeyRemoteImpl() {
		return keyRemoteImpl;
	}

	@Override
	public void run() {
		new KeyRemoteServer(this.keyRemoteImpl, "KeyRemoteRight");
	}
}